package com.example.bnuzzu.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.bnuzzu.common.dto.FavoriteDto;
import com.example.bnuzzu.common.dto.HouseListDto;
import com.example.bnuzzu.entity.Favoritehouse;
import com.example.bnuzzu.mapper.FavoritehouseMapper;
import com.example.bnuzzu.mapper.HouseinfoMapper;
import com.example.bnuzzu.service.FavoritehouseService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author BNUZZU
 * @since 2021-04-13
 */
@Service
public class FavoritehouseServiceImpl extends ServiceImpl<FavoritehouseMapper, Favoritehouse> implements FavoritehouseService {
    @Autowired
    FavoritehouseMapper favoritehouseMapper;
    @Override
    public IPage<FavoriteDto> selectFavoritePage(Page<FavoriteDto> page, Integer userid){
        page.setOptimizeCountSql(false);
        return favoritehouseMapper.selectPageVo(page,userid);
    }
}
